<!DOCTYPE html>
<html>
<head>
<title>附件表</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link href="../../vendors/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../../vendors/font-awesome/css/font-awesome.min.css"
	rel="stylesheet">
<link href="../../vendors/animate/css/animate.css" rel="stylesheet">
<link href="../../vendors/iCheck/custom.css" rel="stylesheet">
<link href="../../vendors/datepicker/datepicker3.css" rel="stylesheet">
<!-- jqgrid-->
<link href="../../vendors/jqgrid/css/ui.jqgrid-bootstrap.css" rel="stylesheet">
<!-- Sweet Alert -->
<link href="../../vendors/sweetalert/sweetalert.css" rel="stylesheet">
<link href="../../vendors/fileUpload/css/jquery.fileupload.css" rel="stylesheet">
<link href="../../common/css/style.css" rel="stylesheet">		
<!-- 由于使用了自定义标签，jquery必须在之前 -->
<!-- 全局js -->
<script src="../../vendors/jquery/js/jquery.min.js"></script>
<script src="../../vendors/bootstrap/js/bootstrap.min.js"></script>
<!-- jqGrid -->
<script src="../../vendors/jqgrid/js/i18n/grid.locale-cn.js"></script>
<script src="../../vendors/jqgrid/js/jquery.jqGrid.min.js"></script>
<script src="../../vendors/jqgrid/plugins/jquery.tablednd.js"></script>
<script src="../../vendors/vue/vue.min.js"></script>
<!-- iCheck -->
<script src="../../vendors/iCheck/icheck.min.js"></script>
<!-- Sweet alert -->
<script src="../../common/js/curdtools_jqgrid.js"></script>
<script src="../../vendors/layer/layer.min.js"></script>
<script src="../../common/js/common.js"></script>
<script src="../../vendors/fileUpload/jquery.ui.widget.js"></script>
<script src="../../vendors/fileUpload/jquery.iframe-transport.js"></script>
<script src="../../vendors/fileUpload/jquery.fileupload.js"></script>
</head>
<body class="gray-bg">
  <div id="rrapp" v-cloak>
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>附件管理</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a> <a class="close-link"> <i class="fa fa-times"></i>
							</a>
						</div>
					</div>
					<div class="ibox-content">
						<div>
							<!-- 查询条件 -->
							<div class="row">
								<div id="sysAttachmentQuery" class="col-sm-12">
									<div class="form-inline">
	    																											<div class="form-group">
														<label class="control-label">外键编码：</label> 
									<input type="text" placeholder="外键编码" v-model="q.fileNo" name='fileNo' id='fileNo' class='form-control' />
																												<label class="control-label">文件名称：</label> 
									<input type="text" placeholder="文件名称" v-model="q.fileName" name='fileName' id='fileName' class='form-control' />
										</div>
																																	<div class="form-group">
														<label class="control-label">业务编码：</label> 
									<input type="text" placeholder="业务编码" v-model="q.busiNo" name='busiNo' id='busiNo' class='form-control' />
																																													  		</div>
												</div>
									</div>
									<br />
								</div>
							</div>
							<br />
							<!-- 工具栏 -->
							<div class="row" v-show="showList">
								<div class="col-sm-12">
									<div class="pull-left">
									   <span class="btn btn-success fileinput-button">
									        <i class="glyphicon glyphicon-plus"></i>
									        <span>上传文件</span>
									        <!-- The file input field used as target for the file upload widget -->
									        <input id="fileupload" type="file" name="fileupload" multiple>
									    </span>
										<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
									</div>
									<div class="pull-right">
										<a class="btn btn-info" @click="query">查询</a>
										<a class="btn btn-warning" @click="reset"><i class="fa fa-file-code-o"></i>&nbsp;从置</a>
									</div>
								</div>
							</div>
							<div class="jqGrid_wrapper">
								<table id="jqGrid"></table>
								<div id="jqGridPager"></div>
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<script src="../../public/js/sys/sysAttachment/sysattachment.js"></script>
<script type="text/javascript">
$(function () {
	$('#fileupload').fileupload({
		autoUpload: true,//是否自动上传
		dataType: 'json',
		url: '../../sysattachment/upload',
		forceIframeTransport: true,
		done: function (e, data) {//设置文件上传完毕事件的回调函数
			var r = data.result;
	    	if(r.code === 0){
				alert('操作成功', function(index){
					vm.reload();
				});
			}else{
				alert(r.msg);
			}
		}
	});
}); 
</script>
</body>
</html>